<script setup lang="ts">
import { ref } from 'vue'
import { UploadFilled } from '@element-plus/icons-vue'
import { ElMessage } from 'element-plus'
import type { UploadFile } from 'element-plus'

interface DicomFile extends UploadFile {
  preview: string
  seriesNumber: number
  progress: number
  status: 'ready' | 'uploading' | 'success' | 'fail'
}

interface PdfFile extends UploadFile {
  preview: string
  progress: number
  status: 'ready' | 'uploading' | 'success' | 'fail'
  extractedText: string
}

const dicomFiles = ref<DicomFile[]>([])
const pdfFiles = ref<PdfFile[]>([])

const removePdf = (file: PdfFile) => {
  const index = pdfFiles.value.findIndex(f => f.uid === file.uid)
  if (index > -1) {
    pdfFiles.value.splice(index, 1)
  }
}
</script>